/*
 * Loger.cpp
 *
 *  Created on: 2011-04-16
 *      Author: jacek
 */

#include "include/Loger.h"

Loger::Loger(const char* pathToLogFile){
	this->pathToLogFile=pathToLogFile;
}

Loger::~Loger() {
		if(logFile.is_open())
			logFile.close();
}
void Loger::WriteLog(string text){
	logFile.open(pathToLogFile.c_str(),ios::out|ios::app);
	time_t currentTime=time(NULL);
	logFile<<ctime(&currentTime)<<" :";
	logFile<<text<<"\n";
	logFile.close();
}
